Harmony Script

Bake Parent to Drawings

BakeParent

Bake selected drawing’s parent transformations to the drawing for the selected duration of frames.
The script creates new cel on each selected cel, copies the entire cel in the camera view,
disconnects the drawing from its parent, and finally pastes the cel again in the camera view.

This script DOES NOT bake deformations. To achieve that, use Harmony’s official command instead:
Animation > Deformation > Convert Deformed Drawing to Drawings

  • v1.1 – Now it also bakes embedded pivot positions.
  • v1.3 – Added dialog to choose frame range options. Now we can chose to bake only frames when parent peg or drawing of the selected drawing has keys.
  • v1.4 – Now we can chose to bake frames at start of each drawing substituition.
  • v1.5 – On Harmony 16 and up, having “Apply to All Frames” button turned on will no longer cause an issue.
  • v1.7 – This script used to preserve original cels by creating new cels before baking. Now user have an option to bake the transformation to cels directly.
  • v1.71 – Fixed bugs where selecting “Bake Every Frame” option freezes the script.
  • v1.72 – Fixed bugs where selecting “Bake Every Frame” option skips the first selected frame.
  • v1.73 – “drawing.elementMode” attribute is changed to “drawing.ELEMENT_MODE” to accommodate Harmony 22 update.

Download


Installation:

  1. Click on the Download button above. The GitHub page for this script will open.
  2. On the page, click on the Code button then choose Download Zip from the menu.
  3. Locate to your user scripts folder (a hidden folder) for the version of your Harmony.
  4. There is a folder named src inside the zip file. Copy all its contents directly to the folder above.
  5. In Harmony, add ANM_Bake_Parent_To_Drawings function to any toolbar.

Direction:

  1. You can either select a drawing node in Camera/Node view or select a range of cels (drawing substitutions) in the Timeline. Later will make the script’s start and end frames set when the script’s option dialog is launched.
  2. Run ANM_Bake_Parent_To_Drawings.
  3. Set Keyframe Options on the launched dialog:
    1. “Bake frame at start of drawing substitution”
      Only create a new cel with the baked transformation on the first frame of each cel exposure.
    2. “Bake frame when parent has key”
      Only create a new cel with the baked transformation on the frame number when the drawing’s parent node has a keyframe.
    3. “Bake every frame”
      Create a new cel with the baked transformation on every frame.
  4. Set Frame Range Options.
  5. Check “Bake Drawing Pivot Positions” on if you want the script to bake each cel’s drawing pivot positions.
  6. Hit OK. This will create new cels on the selected drawing node with the baked transformation of its parent nodes. The script will also unlink the drawing node from its parent so the user can see the accurate result.

Copyright © 2024 Yu Ueda All Rights Reserved.